Search
Other Articles Anywhere questions
Forum

How do I filter on tags in {articles-others} while {articles-others} is in a {foreach}-loop

Ton van Loon's Avatar Ton van Loon
I have 3 articles (of one category=9) with only 1 tag, each a child-tag

When I do a {foreach} over this articles (in 1 category) the {foreach}-loop nicely returns the 3 child-tags [row:tags] for these 3 articles.

But when a insert a {articles-others} into the {foreach}-loop and filter the {articles-others} on these [row:tags] the {articles-others} returns also articles that do not belong to the [row:tag] at hand?

What am I doing wrong?

{articles category:id="9" tags="Verenigingsjaar" include-child-tags="true"}  

{foreach data="tags"}
<h3><strong>[row:tags layout="false" links="false"]  [row:tags:id]</strong></h3>
<hr/>

{articles-others tags="[row:tags]"  && category="Voorstellingen" include-sub-categories="true"}
<h4>[count]. <strong>[link][title][/link]</strong></h4>
<strong>Regie:</strong> [category:link][category][/category:link]     |     <b>Kenmerken: </b>[tags layout="false" links="true" separator=" - "] <br/>
<strong>Spel:</strong> [spel]<hr/>
{/articles-others}

{/foreach}

{/articles}

Without {articles-others}
https://imgur.com/8dziSTV

With {articles-others}
https://imgur.com/V4SvZFx
Peter van Westen's Avatar Peter van Westen ADMIN
That is because you are using:
&& category="Voorstellingen"
The '&&' (an alias of '||') means that it will also include all articles in that category.

To only show articles with the given tags and the given category, remove the '&&'.

See:
docs4.regularlabs.com/articlesanywhere/p...nced#multiple-groups
Please post a rating at the Joomla! Extensions Directory
Ton van Loon's Avatar Ton van Loon
Unfortunately remoing the '&&' from the code did not help. No change
Then updated from ArticlesAnywhere-v11.1.0-dev2151484-PRO to articlesanywhere-v11.1.0-pro No change.
Refreshed browser cache. No change.
{articles category:id="9" tags="Verenigingsjaar" include-child-tags="true"}  
{foreach data="tags"}
<h3><strong>[row:tags layout="false" links="false"]  [row:tags:id]</strong></h3>
<hr/>
{articles-others tags="[row:tags]" category="Voorstellingen" include-sub-categories="true"}
<h4>[count]. <strong>[link][title][/link]</strong></h4>
<strong>Regie:</strong> [category:link][category][/category:link]     |     <b>Kenmerken: </b>[tags layout="false" links="true" separator=" - "] <br/>
<strong>Spel:</strong> [spel]<hr/>
{/articles-others}
{/foreach}
{/articles}
Peter van Westen's Avatar Peter van Westen ADMIN
You are using [row:tags], which isn't a valid thing and doesn't make sense (as 'row' references a single tag).

Try using:
tags="[row:text]"
Please post a rating at the Joomla! Extensions Directory
Ton van Loon's Avatar Ton van Loon
Thank you!
tags="[row:text]"
is working as intended! Thank you for your prompt replies!
You can only post on the extension support forum if you have an active subscription and you log in

Buy a Pro subscription